home *** CD-ROM | disk | FTP | other *** search
/ Champak 49 / Volume 49 - JOGO DISK .iso / Games / honeytrouble.swf / scripts / frame_113 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  1.2 KB  |  45 lines

  1. stop();
  2. bu.onPress = function()
  3. {
  4.    trace(start_time + "--------------------------------------------------");
  5.    tmp_ball_ball_type_arr = [random(4) + 1,random(4) + 1,random(4) + 1];
  6.    gotoAndPlay(1);
  7. };
  8. moreGame.onRelease = function()
  9. {
  10.    getURL(_root.localization_url1,"_blank");
  11. };
  12. trace(so.data.scores + "=====");
  13. var i = 0;
  14. while(i < so.data.scores.length - 1)
  15. {
  16.    var j = i + 1;
  17.    while(j < so.data.scores.length)
  18.    {
  19.       if(so.data.scores[i][1] > so.data.scores[j][1])
  20.       {
  21.          var tmp = so.data.scores[i];
  22.          so.data.scores[i] = so.data.scores[j];
  23.          so.data.scores[j] = tmp;
  24.       }
  25.       j++;
  26.    }
  27.    i++;
  28. }
  29. var i = 1;
  30. while(i < 8)
  31. {
  32.    var name_txt = this["name_txt" + i];
  33.    var scores = this["scores" + i];
  34.    name_txt.text = so.data.scores[so.data.scores.length - i][0];
  35.    scores.text = so.data.scores[so.data.scores.length - i][1];
  36.    trace(" name_txt = " + name_txt + " scores = " + scores);
  37.    trace(" name_txt.text = " + name_txt.text + " scores.text = " + scores.text);
  38.    if(so.data.scores[so.data.scores.length - i][0] == undefined)
  39.    {
  40.       name_txt.text = "";
  41.       scores.text = "";
  42.    }
  43.    i++;
  44. }
  45.